package com.bzframework.pro.enums;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * @Author bingzhong
 * @Date 2025/4/10 19:10
 * @Description
 */
@Getter
@RequiredArgsConstructor
public enum GradeEnum {


    /**
     * 小班
     */
    small(10,"小班"),
    /**
     * 中班
     */
    middle(20, "中班"),
    /**
     * 大班
     */
    big(30, "大班"),
    gradeOne(40,"一年级"),
    gradeTwo(50,"二年级"),
    graderThree(60,"三年级"),
    graderFour(70,"四年级"),
    graderFive(80,"五年级"),
    graderSix(90,"六年级"),
    gradeSeven(100,"初一"),
    gradeEight(110,"初二"),
    gradeNine(120,"初三"),
    /**
     * 高一
     */
    highOne(130,"高一"),
    highTwo(140,"高二"),
    highThree(150,"高三"),
    /**
     * 高中毕业
     */
    highGraduate(160,"高中毕业"),

    university(170,"大学"),
    adult(180,"成人"),
    /**
     * 其它
     */
    other(999,"其它");

    private final int code;

    private final String name;

    public static GradeEnum of(int code) {
        for (GradeEnum grade : GradeEnum.values()) {
            if (grade.getCode() == code) {
                return grade;
            }
        }
        return GradeEnum.other;
    }


}
